package com.example.mvpdemo.mvp5;


import com.example.mvpdemo.mvp4.ILoginView4;
import com.example.mvpdemo.mvp4.LoginModel4;
import com.example.mvpdemo.mvp4.base.BasePresenter4;
import com.example.mvpdemo.mvp5.base.BasePresenter5;
import com.example.mvpdemo.net.NetworkCallback;

public class LoginPresenter5 extends BasePresenter5<ILoginView5> {
    private LoginModel5 loginModel5;

    public LoginPresenter5() {
        loginModel5 = new LoginModel5();
    }

    public void login(String username, String psd) {
        loginModel5.login(username, psd, new NetworkCallback() {
            @Override
            public void result(String result) {
                if (getView() != null)
                    getView().onLoginResult(result);
            }
        });
    }


}
